package logic

import (
	"news/dao/redis"
	"news/models"
	"strconv"

	"go.uber.org/zap"
)

func VoteFormPost(userId int64, p *models.ParamVoteDataForm) (err error) {
	zap.L().Debug("logic VoteFormPost",
		zap.Int64("userId", userId),
		zap.String("postId", p.PostID),
		zap.Int8("direction", p.Direction),
		zap.Error(err))
	return redis.VoteFormPost(strconv.Itoa(int(userId)), p.PostID, float64(p.Direction))

}
